/**
 * 玻璃棒
 */
Rod = Widget.extend({
	ctor:function(){
		this._super();
		this.initRod();
		this.setTag(TAG_DRAINAGE);
	},
	initRod:function(){
		var rod = new Button(this, 10, TAG_ROD, "#rod.png", this.callback);
		rod.setPosition(cc.p(33,191));
		rod.setScale(2, 1);
		rod.setRotation(50);

		var hand = new Button(this, 9, TAG_LEFT, "#rod_hand.png", this.callback);
		hand.setPosition(cc.p(-55,260));
//		hand.setScale(0.7);

		var part = new Button(this, 11, TAG_LEFT_PART, "#rod_hand_part.png", this.callback);
		part.setPosition(cc.p(-55,260));
//		part.setScale(0.7);




		this.callNext = cc.callFunc(function(){
			gg.flow.next();
		}, this);
		this.callNext.retain();
	},
	callback:function(p){
		var action=gg.flow.flow.action;
		var hand=this.getChildByTag(TAG_RIGHT);
		var part=this.getChildByTag(TAG_RIGHT_PART);


		switch(p.getTag()){
		case TAG_IRON:
			if(action==ACTION_DO1){				

			}else if(action==ACTION_DO2){

			}else if(action==ACTION_DO3){

			}
			break;
		}
	},
	actionDone:function(p){
		switch(p.getTag()){
		case TAG_IRON:	
			gg.flow.next();
			break;
		}
	},
	onExit:function(){
		this._super();
		this.callNext.release();
	}
});